<?php
$params = ((count($_GET) > 0) ? http_build_query($_GET) : '');
include_once 'conexion.php';
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Gestion de Productos</title>
        <link rel="stylesheet" type="text/css" href="css/doc.css" />
        <script type="text/javascript">
            function setHeight(){
                document.getElementById('iframe_princip').style.height=screen.height+'px';
            }

            function hreftarget(file, name_frame, obj){
                document.getElementById('iframe_princip').contentWindow.frames[name_frame].location=file;
            }
        </script>
    </head>
    <body>
        <table class="logo">
            <tbody>
                <tr>
                    <td class="logo">[SWAI]</td>
                </tr>
            </tbody>
        </table>
    <?php //acceso
    if(isset ($_SESSION['usu_rusu_id'])){
    ?>
        <table class="horzMenu">
            <tbody>
                <tr>
                    <td class="horzMenuFiller"></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" href="index.php">Inicio</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/clientes.php', 'showframe', this)">Clientes</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/proveedores.php', 'showframe', this)">Proveedores</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/depositos.php', 'showframe', this)">Depositos</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/productos.php', 'showframe', this)">Productos</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/ingresos.php', 'showframe', this)">Compras</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/egresos.php', 'showframe', this)">Ventas</a></td>
                    <td class="horzMenu">&nbsp;&#124;&nbsp;</td><td class="horzMenu"><a class="horzMenu" onclick="hreftarget('apps/stocks_manuales.php', 'showframe', this)">Stock manual</a></td>
                </tr>
            </tbody>
        </table>
    <?php //acceso
    }
    ?>
        <IFRAME id="iframe_princip" src="paneles.php?<?php echo $params ?>" scrolling="auto" frameborder="0" style="width:100%;" onload="setHeight()">
        [Su agente de usuario no soporta marcos o estilos actualmente configurado
        para no mostrar marcos. Sin embargo, puede visitar
        <A href="paneles.php">el documento relacionado.</A>]
        </IFRAME>
    </body>
</html>
